import 'dart:convert';

import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/hazard_instrument_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/hazard_instrument_entity.g.dart';

@JsonSerializable()
class HazardInstrumentEntity {

	HazardInstrumentEntity();

	factory HazardInstrumentEntity.fromJson(Map<String, dynamic> json) => $HazardInstrumentEntityFromJson(json);
	String? backupLinkAddress = '';
	String? equipCode = '';
	String? equipName = '';
	String? equipTypeDicId = '';
	String? equipTypeName = '';
	String? hazardCode = '';
	List<HazardInstrumentHazardTargetVOList>? hazardTargetVOList = [];
	String? id = '';
	String? manLinkAddress = '';

	Map<String, dynamic> toJson() => $HazardInstrumentEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class HazardInstrumentHazardTargetVOList {

	HazardInstrumentHazardTargetVOList();

	factory HazardInstrumentHazardTargetVOList.fromJson(Map<String, dynamic> json) => $HazardInstrumentHazardTargetVOListFromJson(json);
	String? equipCode = '';
	String? equipName = '';
	String? equipTypeDicId = '';
	String? equipTypeName = '';
	String? hazardCode = '';
	String? id = '';
	String? lastCollectTime = '';
	int? lastValue = 0;
	String? online = '';
	int? rangeDown = 0;
	int? rangeUp = 0;
	String? targetCode = '';
	String? targetName = '';
	String? targetStatus = '';
	String? targetTypeDicId = '';
	String? targetTypeDicName = '';
	int? thresholdDown = 0;
	int? thresholdDown2 = 0;
	int? thresholdUp = 0;
	int? thresholdUp2 = 0;
	String? unit = '';

	Map<String, dynamic> toJson() => $HazardInstrumentHazardTargetVOListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}
